package com.sz.test;

import com.sz.mapper.EditMapper;
import com.sz.mapper.FrozenMapper;
import com.sz.mapper.UserInfoMapper;
import com.sz.model.BankCard;
import com.sz.model.BankResult;
import com.sz.model.TUser;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest
public class Userupdatetest {

    @Autowired
    EditMapper editMapper;

    @Autowired
    private FrozenMapper frozenMapper;

    @Autowired
    private UserInfoMapper userInfoMapper;



    @Test
    public void test1(){
        editMapper.ChangePassword("曹一","qwerew");
    }

    @Test
    public void test2(){
        BankResult byAccount = frozenMapper.getByAccount("2021076297909001530");

        System.out.println("byAccount.toString() = " + byAccount.toString());
        
    }

    @Test
    public void test3(){

//        BankCard bankCard = userInfoMapper.queryBank(new Long(1));
//        System.out.println(bankCard.toString());

        Long aLong = userInfoMapper.queryUserId("13726695562");

        System.out.println(aLong);

        TUser tUser = userInfoMapper.queryById(aLong);

        System.out.println("tUser.toString() = " + tUser.toString());

        BankCard bankCard = userInfoMapper.queryBankInfo(tUser.getUkIdentityId());

        System.out.println("bankCard.toString() = " + bankCard.toString());



    }
    
    @Test
    public void test4(){
//        List<BankCard> bankCards = userInfoMapper.queryBank(1);
//
//        System.out.println("bankCards.toString() = " + bankCards.toString());

        System.out.println(userInfoMapper.getBankList(new Long(1)));

    }
}
